#include "mybitset.h"
#include <bitset>

void test1()
{
	MyBitset<100> bits;
	bits.set(40);
	bits.set(39);

	cout << bits.test(38) << endl;
	cout << bits.test(39) << endl;
	cout << bits.test(40) << endl;
	cout << bits.test(41) << endl;
	cout << bits.test(42) << endl << endl;

	bits.reset(40);
	cout << bits.test(38) << endl;
	cout << bits.test(39) << endl;
	cout << bits.test(40) << endl;
	cout << bits.test(41) << endl;
	cout << bits.test(42) << endl;
}

void test2()
{
	MyBitset<0xffffffff> bs;
	MyBitset<-1> bs2;
}

void test3()
{
	bitset<100> bs;
	bs.set(40);
	bs.set(41);
	bs.set(42);
	cout << bs.to_string() << endl;
	// bitset<134217728> bs2;  err ?
}

void test4()
{
	int a[] = { 1, 2, 3, 3, 2, 5, 7,19, 19,30, 30,32,38 };
	TwoBitset<100> tb;
	for (const auto& e : a) {
		tb.set(e);
	}
	tb.PrintOnce();
}

int main()
{
	// test2();
	// test3();
	test4();
	return 0;
}